﻿@model yq.WebModel.ListPage<yq.WebModel.Sys.TeamUser>


       <table class="table table-bordered table-striped"  style="width:700px;">
            <thead>
                <tr style="width:700px;background-color:#D6E9C6">
                    <th style="width: 250px">
                        @(Html.RawFor(obj => obj.PageList[0].NickName))
                    </th>
                    <th style="width: 200px">
                        @(Html.RawFor(obj => obj.PageList[0].CreateTtime))
                    </th>
                    <th style="width: 180px">
                        @(Html.RawFor(obj => obj.PageList[0].PurviewEnum))
                    </th>
                    <th style="width: 150px">
                        @(Html.RawFor(obj => obj.PageList[0].State))
                    </th>
                    <th style="width: 150px">
                        操作
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var info in Model.PageList)
                {
                    <tr>
                        <td>
                            @info.NickName
                        </td>
                        <td>
                            @info.CreateTtime.ToString("yyyy-MM-dd")
                        </td>
                        <td>
                            @info.PurviewEnum.ExtName()
                        </td>
                        <td >
                            @info.State.ExtName()
                        </td> 
                        <td>
                          @if (info.IsTeam == yq.Enums.BooleanType.Yes)
                          {
                             @Html.Raw("已添加")
                          }
                          else
                          { 
                            @Html.ActionRoleLink(Model.RoleLinkList["选择"], new { userId = info.UserId, TeamId=info.TeamId }, new { id = "a_" + info.UserId, alt = "添加到团队？", onclick = "return $.confimSubmit(this,onAdd)" })
                          }
                        </td>
                    </tr>
                }
               
                @if (Model.PageList.Count == 0)
                { 
                    
                    <tr>
                        <td colspan="5" style=" text-align:center" >
                            未能搜索到数据
                        </td>
                    </tr>
                }
            </tbody>
        </table>
  
@Html.Pager(Model.PageList)

<script>
function onAdd(obj)
{
  $.tips("操作成功");
  $("#a_"+obj.Value).html("已添加");
  $("#a_"+obj.Value).attr("href","");
  $("#a_"+obj.Value).attr("onclick","return false;");
}

</script>
